package mystudy
// 闭包函数
import "fmt"

func GetSum() func(int) int {
	var sum int = 0 
	fmt.Println("闭包函数-外部")
	return func(num1 int) int{
		sum += num1
		fmt.Println("闭包函数-内部")
		return sum
	}
}